import request from '@/utils/request'
export function list(params) {
  return request({
    url: '/admin/allocate/list',
    method: 'get',
    params: params
  })
}
export function save(data,params) {
  return request({
    url:'/admin/allocate/save',
    method: 'post',
    data:data,
    params:params
  })
}
export function saveAndConfirm(data,params) {
  return request({
    url:'/admin/allocate/saveAndConfirm',
    method: 'post',
    data:data,
    params:params
  })
}
export function find(id) {
  return request({
    url:'/admin/allocate/find/'+id,
    method: 'get',
  })
}

export function update(data,params) {
  return request({
    url: '/admin/allocate/update',
    method: 'post',
    data: data,
    params:params
  })
}
export function del(ids) {
  return request({
    url: '/admin/allocate/del/' + ids,
    method: 'post'
  })
}

export function confirm(orderId) {
  return request({
    url:'/admin/allocate/confirm/'+orderId,
    method: 'post',
  })
}

export function alloteIn(ids,data) {
  return request({
    url: '/admin/allocate/alloteIn/'+ids,
    method: 'post',
    data: data
  })
}

export function alloteOut(ids,data) {
  return request({
    url: '/admin/allocate/alloteOut/'+ids,
    method: 'post',
    data: data
  })
}

export function unconfirm(id) {
  return request({
    url: '/admin/allocate/unconfirm/' + id,
    method: 'post'
  })
}
